Post

Replies

Boosts

Views

Activity

Multi-line mathematical expressions
I took a look at Swift when it first came out, and was turned off by the inability to do multi-line mathematical expressions. With the world moving to Swift, I have started looking at Swift 5, and find it still doesn't seem to offer a solution.In effect, instead of writing an expression like:a = (b+(c+d)*e + f*g)I'd prefer to do something like: a = (b + (c+d)*e +f*g)and even better still (easy in C): a = (b // some comment + (c+d)*e // some other comment +f*g) // yet another commentThis sort of thing can be important in comprehensible scientific computation. Is there a way to do it in Swift?
4
0
1.2k
Nov ’19